package com.yykj.hospital.server.dto.account;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.yykj.common.util.serializer.LocalDate2LongSerializer;
import com.yykj.hospital.server.enums.AccountLogType;
import com.yykj.hospital.server.enums.IncomeExpendType;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
public class DoctorBalanceLogDTO {

    @ApiModelProperty("医生ID")
    private String doctorId;

    @ApiModelProperty("账号日志交易类型")
    private AccountLogType logType;

    @ApiModelProperty("账号日志交易类型名称")
    private String logTypeName;

    @ApiModelProperty("账号日志交易类型")
    private String logTypeIcon;

    @ApiModelProperty("订单号")
    private String orderNum;

    @ApiModelProperty("收入或者支出")
    @Enumerated(EnumType.STRING)
    private IncomeExpendType incomeExpend;

    @ApiModelProperty("交易金额")
    private BigDecimal price;

    @ApiModelProperty("手续费")
    private BigDecimal fee;

    @ApiModelProperty("到账金额")
    private BigDecimal amount;

    @ApiModelProperty("交易简介")
    private String detail;

    @JsonSerialize(using = LocalDate2LongSerializer.class)
    @ApiModelProperty("交易时间")
    private LocalDateTime addTime;
}
